package org.jeecg.modules.mall.service;

import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.mall.entity.TbMnUser;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @Description: app用户
 * @Author: jeecg-boot
 * @Date:   2020-05-12
 * @Version: V1.0
 */
public interface ITbMnUserService extends IService<TbMnUser> {


    Result<?> sendSms(String phone);

    Result<?> setLoginPwd(String phone, String password);

    Result<?> login(String phone, String password);

    TbMnUser getUserByPhone(String userName);

    Result<?> checkCode(String phone, String code);

    Result<?> loginByInviteCode(String phone, String inviteCode) ;

    Result<?> getInvitedData(String userId);

    Result<?> updatePhoneById(TbMnUser tbMnUser, String code);

    Result<?> logout(String phone);

    Result<?> readNewGuide(String user_id);

    Result<?> getPersonCenterData(String user_id);

    Result<?> checkOldPhone(String user_id, String phone, String code);

    Result<?> updatePhone(String user_id, String phone, String code);

    Result<?> updatePushMsgState(String user_id, Integer pushMsgState);

    Result<?> updateUserAvater(TbMnUser tbMnUser);

    Result<?> updateUserName(TbMnUser tbMnUser);

    Result<?> bindingWeixin(TbMnUser tbMnUser);

    Result<?> getMyInvitees(String user_id);

    Integer getInviteesNumberByInviteCode(String user_id);

    Result<?> removeAllData(List<String> asList);

    Result<?> appRegister(String phone, String inviteCode, String code);

    /**
     * 上一级邀请人信息
     * @return
     */
    TbMnUser getInviteesUpperFirst(TbMnUser tbMnUser);

    void removeByUserId(String id);
}
